import request from '@/utils/request'

// 查询组织列表
export function listOrganize(query) {
  return request({
    url: '/qcmasterdata/organize/list',
    method: 'get',
    params: query
  })
}
// 查询组织下拉列表
export function listOrganizeData() {
  return request({
    url: '/qcmasterdata/organize/listData',
    method: 'get'
  })
}

// 查询组织详细
export function getOrganize(id) {
  return request({
    url: '/qcmasterdata/organize/' + id,
    method: 'get'
  })
}

// 新增组织
export function addOrganize(data) {
  return request({
    url: '/qcmasterdata/organize',
    method: 'post',
    data: data
  })
}

// 修改组织
export function updateOrganize(data) {
  return request({
    url: '/qcmasterdata/organize',
    method: 'put',
    data: data
  })
}

// 删除组织
export function delOrganize(id) {
  return request({
    url: '/qcmasterdata/organize/' + id,
    method: 'delete'
  })
}

// 导出组织
export function exportOrganize(query) {
  return request({
    url: '/qcmasterdata/organize/export',
    method: 'post',
    params: query
  })
}
